<include file="header" />
<div class="main-container" id="main-container">
	<script type="text/javascript">
		try{ace.settings.check('main-container' , 'fixed')}catch(e){}
	</script>
	 <include file="Public:sidebar" />
	 <div class="main-content">
		<div class="breadcrumbs" id="breadcrumbs">
			<script type="text/javascript">
				try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
			</script>
			<ul class="breadcrumb">
				<li>
					<i class="ace-icon fa fa-home home-icon"></i>
					<a href="__MODULE__/">主页</a>
				</li>
				<li class="active">{$title}</li>
			</ul><!-- /.breadcrumb -->
		</div>	 
			<div class="page-content">
				<div class="row">
					<div class="col-md-12">
					<foreach name="article" item="v">
					<form action="__CONTROLLER__/editHandle" method="post" class="form-horizontal" role="form">
					<div class="row">
						<div class="col-md-9">
							<div class="form-group">
								<label class="col-sm-1 control-label" for="title"> 标题 </label>

								<div class="col-sm-11">
									<input type="text" value="{$v.title} "name="title" id="title" placeholder="请文章输入标题" class="form-control">
								</div>
							</div>	
							<div class="clearfix"></div>	
							<!-- 编辑器开始 -->
							<script id="container" name="content" type="text/plain"><?php echo htmlspecialchars_decode($v['content']); ?></script>						
							<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
						    <!-- 编辑器源码文件 -->
						    <script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
						    <!-- 实例化编辑器 -->
						    <script type="text/javascript">
						        var ue = UE.getEditor('container', {
									initialFrameHeight :800,
								    autoHeightEnabled: true,
								    autoFloatEnabled: true,
								});
						    </script>							
					    	<!-- 编辑器结束 -->						
						</div>
						<div class="col-md-3">
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="cate_id"> 分类目录 </label>

							<div class="col-sm-9">
								<select name="cate_id" id="cate_id" class="postform">
									<foreach name="cate" item="c">
										<option value="{$c.id}"<if condition="$v['cate_id'] eq $c['id']">selected="selected" </if>>{$c.html}{$c.name}</option>
									</foreach>
								</select>
							</div>
						</div>

						<div class="space-4"></div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 文章属性 </label>
							<div class="col-sm-9">
								<div class="checkbox" style="float:left;margin-right: 10px;padding-left:0;">
									<label>
										<input name="top" type="checkbox" class="ace" <if condition="$v['top'] eq 1">checked="checked"</if>>
										<span class="lbl"> 置顶</span>
									</label>
								</div>																						
							</div>
						</div>
						<div class="space-4"></div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">标签</label>

							<div class="col-sm-9">
								<div class="inline">
									<input type="text" name="tags" id="form-field-tags"  placeholder="输入标签后回车" />
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">缩略图</label>

							<div class="col-sm-9">
									<input type="text" name="thumb" id="savepath" value="{$v.thumb}"/>
									<a href="#" id="upload" class="btn btn-info btn-sm">上传图片</a>
									<div id="result"></div>
									<div class="clearfix"></div>
									<div class="row">
										<div class="col-md-12">
											<div class="thumb">
												<img src="__ROOT__{$v.thumb}" alt="" style="width:100%">
											</div>
										</div>
									</div>

							</div>
						</div>						
						<hr>
						<div class="clearfix form-actions">
						<input type="hidden" name="id" value="{$v.id}">
							<div class="row">
								<div class="col-md-6">
									<button class="btn " type="reset" >
										<i class="ace-icon fa fa-undo bigger-110"></i>
										重置
									</button>								
								</div>
								<div class="col-md-6">
									<button class="btn btn-info" type="submit" style="float:right">
										<i class="ace-icon fa fa-check bigger-110"></i>
										更新
									</button>								

								</div>
							</div>
						</div>							
						</div>
					</div>						



					</form>	

					</foreach>
					</div>			
						<div id="dialog-confirm" class="hide">
							<form id="thumbupload"  action="__CONTROLLER__/thumb" enctype="multipart/form-data" method="post" >
								<input type="file" name="photo" class="btn btn-success btn-sm" value="浏览" />
								<input type="submit" class="btn btn-info btn-sm" value="上传">	
							</form>																			
						</div>					
					</div>			
	
				</div>
			</div><!-- /.page-content -->
	 </div>
	<div class="footer">
		<div class="footer-inner">
			<div class="footer-content">
				<span class="bigger-120">
					Powered By <span class="blue bolder"><a href="http://www.mubansky.com" target="_blank" >SkyCMS</a></span>
					&copy; 2012-2014
				</span>

				&nbsp; &nbsp;
				<span class="action-buttons">
					<a href="#">
						<i class="ace-icon fa fa-twitter-square light-blue bigger-150"></i>
					</a>

					<a href="#">
						<i class="ace-icon fa fa-facebook-square text-primary bigger-150"></i>
					</a>

					<a href="#">
						<i class="ace-icon fa fa-rss-square orange bigger-150"></i>
					</a>
				</span>
			</div>
		</div>
	</div>

	<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
		<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
	</a>

</div>



 <include file="footer" />
















